package com.hxzy.rocketmqproduce.consumer;

import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

@Component
@RocketMQMessageListener(consumerGroup = "testTopic-consumer01", topic = "testTopic",selectorExpression = "TagA")
public class TestTopic_TagAConsumer implements RocketMQListener<String> {
    @Override
    public void onMessage(String message) {
        System.out.println("线程"+Thread.currentThread().getId()+",selectorExpression=TagA,组名：testTopic-consumer01，收到了消息:"+message);
    }
}
